setTransformParent

abstract fun setTransformParent(block: DesignBlock, parent: DesignBlock?)

Makes a block follow the transform of another block, or stops it from following one. The block's position, rotation and scale are then read in the local space of the transform parent, so the block moves with it. The block does not keep its place on screen when the link changes. Only the transform is inherited: opacity, visibility and the stacking order still come from the block's own parent. A hidden block can be a transform parent. When the transform parent is destroyed, the block stops following it. A block whose transform is locked can neither get nor lose a link. Required scope: "layer/move" Experimental: this API may change in a minor release.

Parameters

block

the graphic or text block that follows.

parent

the graphic or text block to follow, or null to remove the link.